package stationGUI;

import java.io.IOException;
import java.net.ServerSocket;

public class MultiServer {
  
  public static void main(String[] args) throws IOException {
    ServerSocket serverSocket = null;
    boolean listening = true;
    SuperStation structure=new SuperStation();

    try {
        serverSocket = new ServerSocket(1099);
    } catch (IOException e) {
        System.err.println("Could not listen on port: 1099.");
        System.exit(-1);
    }

    //ServerNode n=structure.getNode();
    //System.out.println(n.numNeighbors);
    while (listening)
      new MultiServerThread(serverSocket.accept(),structure.getNode()).start();

    serverSocket.close();
    }
}